package leetcode.code0221;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution221 implements IDebug {

	public abstract int maximalSquare(char[][] matrix);

	@Override
	public void debug1() {
		String str = "[[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]";
		char[][] matrix = HelpDebug.str2array5(str);
		int e = 4;
		int r = this.maximalSquare(matrix);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[[\"0\",\"1\"],[\"1\",\"0\"]]";
		char[][] matrix = HelpDebug.str2array5(str);
		int e = 1;
		int r = this.maximalSquare(matrix);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		String str = "[[\"0\"]]";
		char[][] matrix = HelpDebug.str2array5(str);
		int e = 0;
		int r = this.maximalSquare(matrix);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		String str = "[[\"1\",\"0\",\"1\",\"0\",\"0\",\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"1\",\"1\",\"1\",\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\",\"1\",\"0\",\"1\",\"1\",\"1\"]]";
		char[][] matrix = HelpDebug.str2array5(str);
//		H.printObject(matrix);
		int e = 9;
		int r = this.maximalSquare(matrix);
		HelpDebug.compare(e, r);
	}


	public void debug5() {
		String str = "[[\"0\"],[\"1\"]]";
		char[][] matrix = HelpDebug.str2array5(str);
		int e = 1;
		int r = this.maximalSquare(matrix);
		HelpDebug.compare(e, r);
	}


}
